package com.beep.erp.common.utils;

import android.content.Context;
import android.widget.Toast;

import com.beep.erp.AppContext;


/**
 * FileName:ToastUtils.java
 * Description:提示工具
 * Author:dingboyang
 * Date:18/8/23
 */
public class ToastUtils {

    private ToastUtils() {
    }


    private static void show(Context context, int resId, int duration) {
        Toast.makeText(context, resId, duration).show();
    }


    private static void show(Context context, String message, int duration) {
        Toast.makeText(context, message, duration).show();
    }


    public static void showShort(int resId) {
        Toast.makeText(AppContext.context(), resId, Toast.LENGTH_SHORT).show();
    }


    public static void showShort(String message) {
        Toast.makeText(AppContext.context(), message, Toast.LENGTH_SHORT).show();
    }


    public static void showLong(int resId) {
        Toast.makeText(AppContext.context(), resId, Toast.LENGTH_LONG).show();
    }


    public static void showLong(String message) {
        Toast.makeText(AppContext.context(), message, Toast.LENGTH_LONG).show();
    }

    public static void show(String message,int duration) {
        Toast.makeText(AppContext.context(), message, duration).show();
    }

    public static void show(int resId,int duration) {
        Toast.makeText(AppContext.context(), resId, duration).show();
    }


}
